package com.aos.erp.manager.model.applyschool.ro;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import javax.validation.constraints.*;
import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 驾校信息表
 * </p>
 *
 * @author ywb
 * @since 2018-11-02
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("t_drivers_school")
public class ApplySchoolRo implements Serializable {

    private static final long serialVersionUID = 1L;


    /**
     * 类别  （1：直营总校  2：非直营总校  3:分校 4：报名点）
     */
    @NotNull(message = "类别不能为空")
    @ApiModelProperty(value = "类别  （1：直营总校  2：非直营总校  3:分校 4：报名点）", required = true, dataType = "int")
    @Max(value = 4,message = "请填入正确驾校类型")
    @Min(value = 1,message = "请填入正确驾校类型")
    private Integer type;
    /**
     * 父级驾校ID(当申请为报名点类型时，必传)
     */
    @TableField("parent_id")
    @ApiModelProperty(value = "父级驾校ID", dataType = "long")
    private Long parentId;

    /**
     * 驾校名称
     */
    @Size(max=50,min=1,message="驾校名称汉字+字母+数字，50字符内！")
    @ApiModelProperty(value = "驾校名称", required = true, dataType = "String")
    @NotNull(message = "驾校名称不能为空")
    private String name;

    /**
     * 驾校代码
     */
    @Size(max=10,min=0,message="驾校代码10字符内！")
    @ApiModelProperty(value = "驾校代码", required = true, dataType = "String")
    //@NotNull(message = "驾校代码不能为空")
    private String code;

    /**
     * 营业执照注册号
     */
    @Size(max=18,min=15,message="请输入15位营业执照号或18位统一社会信用号！")
    @ApiModelProperty(value = "营业执照注册号", dataType = "String")
    //@NotNull(message = "营业执照注册号不能为空")
    private String licensenumber;

    /**
     * 省ID
     */
    @NotNull(message = "省不能为空")
    @ApiModelProperty(value = "省ID", required = true, dataType = "long")
    @TableField("province_id")
    private Long provinceId;
    /**
     * 市ID
     */
    @NotNull(message = "市不能为空")
    @ApiModelProperty(value = "市ID", required = true, dataType = "long")
    @TableField("city_id")
    private Long cityId;
    /**
     * 区县ID
     */
    @NotNull(message = "区不能为空")
    @ApiModelProperty(value = "区县ID", required = true, dataType = "long")
    @TableField("area_id")
    private Long areaId;

    /**
     * 详细地址
     */
    @ApiModelProperty(value = "详细地址", required = true, dataType = "String")
    @NotNull(message = "详细地址不能为空")
    private String address;
    /**
     * 经度
     */
    @NotNull(message = "经度不能为空")
    @ApiModelProperty(value = "经度", required = true, dataType = "String")
    private String longitude;
    /**
     * 纬度
     */
    @NotNull(message = "纬度不能为空")
    @ApiModelProperty(value = "纬度", required = true, dataType = "String")
    private String latitude;

    /**
     * 车管所ID
     */
    @NotNull(message = "车管所不能为空")
    @ApiModelProperty(value = "车管所ID", required = true, dataType = "long")
    @TableField("division_id")
    private Long divisionId;

    /**
     * 联系人
     */
    @NotNull(message = "联系人不能为空")
    @ApiModelProperty(value = "联系人", required = true, dataType = "String")
    private String contacts;

    /**
     * 手机号
     */
    @ApiModelProperty(value = "手机号", required = true, dataType = "String")
    @Pattern(regexp = "^1(3|4|5|6|7|8|9)\\d{9}$",message = "手机号码格式不对")
    @NotNull(message = "手机号不能为空")
    private String  mobile;

    /**
     * 密码
     */
    @ApiModelProperty(value = "密码", required = true, dataType = "String")
    @NotNull(message = "密码不能为空")
    private String  password;


    /**
     * 邮箱
     */
    @ApiModelProperty(value = "邮箱", required = true, dataType = "String")
    @NotNull(message = "邮箱不能为空")
    @Email
    private String  email;


    /**
     * 驾校图片(1,2,3,4)
     */
    @ApiModelProperty(value = "图片(1,2,3,4)", dataType = "String")
    private String schoolPics;

    /**
     * 营业执照图片(1,2,3,4)
     */
    @ApiModelProperty(value = "营业执照图片(1,2,3,4)", dataType = "String")
    private String licensenPics;


    /**
     * USBKEY
     */
    @ApiModelProperty(value = "USBKEY", dataType = "String")
    private String  usbKey;

    /**
     * 设备编号
     */
    @ApiModelProperty(value = "设备编号", dataType = "String")
    private String  devicecode;

    /**
     * 状态
     */
    @ApiModelProperty(value = "状态", dataType = "int",hidden = true)
    private Integer  status;

    /**
     * 创建时间
     */
    @ApiModelProperty(value = "创建时间", dataType = "date",hidden = true)
    private Date created;

    /**
     * 修改时间
     */
    @ApiModelProperty(value = "修改时间", dataType = "date",hidden = true)
    private Date updated;

    /**
     * 是否删除  （0：是    1：否）
     */
    @ApiModelProperty(value = "是否删除  （0：是    1：否）", dataType = "int",hidden = true)
    private Integer  isDel;

}
